<% layout('/layouts/default.html', {title: '涉密文件日志审计管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('涉密文件日志审计管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnExport" title="${text('导出')}"><i class="glyphicon glyphicon-export"></i> ${text('导出')}</a>
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<!--<% if(hasPermi('sd:docLog:edit')){ %>
					<a href="${ctx}/sd/docLog/form" class="btn btn-default btnTool" title="${text('新增涉密文件日志审计')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>-->
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${docLog}" action="${ctx}/sd/docLog/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
			<!--	<div class="form-group">
					<label class="control-label">${text('来文ID')}：</label>
					<div class="control-inline">
						<#form:input path="docId" maxlength="64" class="form-control width-120"/>
					</div>
				</div>-->
				<!--<div class="form-group">
					<label class="control-label">${text('日志内容')}：</label>
					<div class="control-inline">
						<#form:input path="logContent" maxlength="1000" class="form-control width-120"/>
					</div>
				</div>-->
				<div class="form-group">
					<label class="control-label">${text('操作时间')}：</label>
					<div class="control-inline">
						<#form:input path="logDate_gte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
							dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm" data-done="logDate_lte.click()"/>
						&nbsp;-&nbsp;
						<#form:input path="logDate_lte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
							dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('来文标题')}：</label>
					<div class="control-inline">
						<#form:input path="docTitle" maxlength="500" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('文件密级')}：</label>
					<div class="control-inline width-120">
						<#form:select path="secLvl" dictType="recv_sec_lvl" blankOption="true" class="form-control"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('来文文号')}：</label>
					<div class="control-inline">
						<#form:input path="docFullNum" maxlength="100" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('操作用户编号')}：</label>
					<div class="control-inline">
						<#form:input path="optUserCode" maxlength="64" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('操作用户姓名')}：</label>
					<div class="control-inline">
						<#form:input path="optUserName" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<!--<div class="form-group">
					<label class="control-label">${text('操作用户警号')}：</label>
					<div class="control-inline">
						<#form:input path="optUserPoliceno" maxlength="100" class="form-control width-120"/>
					</div>
				</div>-->
				<div class="form-group">
					<label class="control-label">${text('日志类型')}：</label>
					<div class="control-inline width-120">
						<#form:select path="logType" dictType="sd_log_type" blankOption="true" class="form-control"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
	$('#btnExport').click(function(){
		js.ajaxSubmitForm($('#searchForm'), {
			url:'${ctx}/sd/docLog/exportData',
			downloadFile:true
		});
	});
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
	/*	{header:'${text("来文ID")}', name:'docId', index:'a.doc_id', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
			return '<a href="${ctx}/sd/docLog/form?id='+row.id+'" class="btnList" data-title="${text("编辑涉密文件日志审计")}">'+(val||row.id)+'</a>';
		}},*/
		{header:'${text("日志内容")}', name:'logContent', index:'a.log_content', width:150, align:"left"},
		{header:'${text("操作时间")}', name:'logDate', index:'a.log_date', width:150, align:"center"},
		{header:'${text("来文标题")}', name:'docTitle', index:'a.doc_title', width:150, align:"left"},
		{header:'${text("密级")}', name:'secLvl', index:'a.sec_lvl', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('recv_sec_lvl')}, val, '${text("未知")}', true);
		}},
		{header:'${text("来文文号")}', name:'docFullNum', index:'a.doc_full_num', width:150, align:"left"},
		{header:'${text("操作用户编号")}', name:'optUserCode', index:'a.opt_user_code', width:150, align:"left"},
		{header:'${text("操作用户姓名")}', name:'optUserName', index:'a.opt_user_name', width:150, align:"left"},
		{header:'${text("操作用户警号")}', name:'optUserPoliceno', index:'a.opt_user_policeno', width:150, align:"left"},
		{header:'${text("日志类型 ")}', name:'logType', index:'a.log_type', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('sd_log_type')}, val, '${text("未知")}', true);
		}},
		{header:'${text("操作")}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
			var actions = [];
			<% if(hasPermi('sd:docLog:edit')){ %>
				actions.push('<a href="${ctx}/sd/docLog/form?id='+row.id+'" class="btnList" title="${text("编辑涉密文件日志审计")}"><i class="fa fa-search"></i></a>&nbsp;');
			<% } %>
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>